<?php if(!defined('WANYA_ROOT')) {exit('error!');}?>
<div class=containertitle><b>用户→学生管理</b>
	<?php if(isset($addSuccess)):?><span class="actived">添加学生成功</span><?php endif;?>
	<?php if(isset($addErr)):?><span class="error">添加学生失败，该用户已经在学生表中，不能重复添加。</span><?php endif;?>
</div>
<div class=line></div>
	<form action="student_list.php" name="userToStudent" id="userToStudent" method="post">
	<table align="center">
		<tr>
			<td>
				微信用户：　　
			</td>
			<td>
				<input type="text" disabled="disabled" name="user_name" id="user_name">　
				<input type="button" value="选择" onclick="openSelectWin('user','wx_openid','user_name');" class="button">
				<input type="hidden" name="wx_openid" id="wx_openid" >
			</td>
		</tr>

		<tr>
			<td>
				　　　
			</td>
			<td>
				<input type="hidden" name="action" value="userToStudent">
				<input type="hidden" name="mode" value="commit">　
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="button" name="cancel" value="取消" onclick="formCancel()" class="button">	　　　
				<input type="button" name="confirm" value="添加为学生" onclick="addStudent()" class="button">　　
			</td>
		</tr>
	</table>
	</form>
<script type="text/javascript">
	function addStudent()
	{
		$("#userToStudent").submit();
	}
	function formCancel()
	{
		window.location.href="student_list.php";
	}
	setTimeout(hideActived,2600);
</script>